﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ViewLedger.aspx.cs" Inherits="Main_Ledger_ViewLedger" EnableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<%@ Register Src="~/User Controls/CommonControls.ascx" TagName="CommonControls" TagPrefix="MyControls"  %>
<%@ Register Src="~/User Controls/Pager.ascx" TagPrefix="custom" TagName="Pager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link href="../../Styles/accounts.css" rel="stylesheet" type="text/css" />
    <title>Edit Ledger</title>
    <script type="text/javascript" language="javascript">
//        function OpenPopup(id)
//        {
//           
//            window.open('ViewLedger.aspx?Lid='+id,' ','width=400,height=200,toolbar=no,status=yes,menubar=yes,scrollbars=no,resizable=no');
//        }
        
        

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true">
        </asp:ScriptManager>
    </div>
         <asp:UpdateProgress DynamicLayout="false" ID="UpdProgress" runat="server">
            <ProgressTemplate>
                <div align="center"><img src="../../Images/ajax-loader.gif" /></div>
            </ProgressTemplate>
        </asp:UpdateProgress> 
        <div class="divmain">
            <acc:heading ID="pagehead" runat="server" HeadingText="Ledger Details" />
        
        <div>
            
       <div style="padding-bottom:5px; margin-left:30%;">  
           <div style="float:left;"><custom:Pager ID="custPager" runat="server" OnPageChanged="custPager_PageChanged" /></div>
           <div style="float:left; margin-left:10px;"> <MyControls:CommonControls ID="CommonControls1" runat="server" GridviewControlId="grdDisplay" HideColumns="5,6" /> </div>
         </div> 
       
       
         
         <div id="divprint" runat="server" style="margin-left:10%;">
        <asp:GridView ID="grdDisplay" runat="server" Width="90%" AutoGenerateColumns="False" CssClass="gridview"
         AllowPaging="true" PageSize="20" DataKeyNames="LID"  AlternatingRowStyle-CssClass="gridview_alternate"
            onpageindexchanging="grdDisplay_PageIndexChanging" 
                 RowStyle-CssClass="gridviewitem" PagerStyle-CssClass="pgr"
            onselectedindexchanged="grdDisplay_SelectedIndexChanged" 
                 onrowcreated="grdDisplay_RowCreated">
            <Columns>
                <asp:TemplateField HeaderText="S.No." ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <%# Container.DataItemIndex+1 %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="Ledger Name" DataField="LNAME" />
                <asp:BoundField HeaderText="Alternate Name" DataField="LANAME" />
                <asp:BoundField HeaderText="Group/Main Ledger" DataField="GRPNAME" />
                <asp:BoundField HeaderText="Opening Balance" DataField="ACTOPENING" ItemStyle-HorizontalAlign="Right"/>
                <asp:TemplateField HeaderText="Details" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <a href="#" onclick="window.open('LedgerDetail.aspx?Lid=<%# DataBinder.Eval (Container.DataItem,"LID")%>','','width=800,height=600,toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes')" >View</a>
                    </ItemTemplate>
                </asp:TemplateField>               
                <asp:CommandField HeaderText="Edit" SelectText="<img src='../../Menu/images/Edit_user.png'/>" ShowHeader="True" ShowSelectButton="True" ItemStyle-HorizontalAlign="Center" />
            </Columns>
            <PagerStyle HorizontalAlign="Right" />
        </asp:GridView>
        </div>
        </div>
    </div>
    </form>
</body>
</html>
